package com.shanzmoo.db.personnel.entity.dto;

import com.alibaba.fastjson.JSON;
import com.shanzmoo.db.personnel.entity.RootGroupEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;

/**
 * 刷机组保存对象
 *
 * @author: Gzhao 2020/12/15
 */
@Data
@ApiModel("刷机组更新对象")
public class RootGroupUpdateDto extends RootGroupSaveDto{

    @NotNull
    @ApiModelProperty("刷机组id")
    private Integer id;

    @NotNull
    @ApiModelProperty("状态：false-禁用，true-启用")
    private Boolean status;

    public static RootGroupEntity convert(RootGroupUpdateDto saveDto) {
        return JSON.parseObject(JSON.toJSONString(saveDto), RootGroupEntity.class);
    }
}
